<?
if (empty($ID))
{
	$formaction="/lvs/Servers_do_add";
	$formbutton="增加";
	$ID="";
}
else
{
	$formaction="/lvs/Servers_do_edit";
	$formbutton="修改";
}

if (empty($VIP))
	$VIP="";
if (empty($serverip))
	$serverip="";
if (empty($serverlip))
	$serverlip="";
if (empty($servername))
	$servername="";
if (empty($port))
	$port="80";
if (!isset($weight))
	$weight="3";
if (empty($Monitors))
	$Monitors="";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" />
<title><?=$title?></title>
<meta  name="keywords" content="<?=$keywords?> " />
<meta  name="description" content="<?=$description?>"/>	

<!-- CSS -->
<link href="/style/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="/style/css/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="/style/css/ie7.css" /><![endif]-->

<!-- JavaScripts-->
<script type="text/javascript" src="/style/js/jquery.js"></script>
<script type="text/javascript" src="/style/js/jNice.js"></script>
<script language="javascript" src="/js/prototype.js"></script>
<script language="javascript" src="/js/javafunc.js"></script>
</head>

<body onLoad="document.postform.VIP.focus();">
<div id="systemWorking" style="z-index:100; position:absolute;display:none;left:40%;top:40%"><table width="250" height="20" border="0" cellpadding="0" cellspacing="1" bgcolor="#6EB1F4"><tr><td bgcolor="#FFFFFF" align="center" valign="middle"><img src="/images/loading.gif" align=center>　　系统正在处理中...</td></tr></table></div>
	<div id="wrapper">
    	<h1><a href="#"><span>天翌LVS管理系统</span></a></h1>     
			<?
			  	include "lvsmenu_view.php";
			?>   
                <!-- // #sidebar -->
                
                <!-- h2 stays for breadcrumbs -->
               
                
                <!-- // #main -->
                <div class="clear"></div>
</div>
            <!-- // #container -->
        </div>	
        <!-- // #containerHolder -->
    </div>
    <!-- // #wrapper -->
<table height="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE" class="tables_main">
      <tr>
        <td height="193" align="center">
	<table width="20" border="0" cellpadding="0">
          <tr>
            <td height="4"></td>
          </tr>
        </table>
	<table height="490" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td width="80" height="60" valign="top">
			<?
			include "lvsfunmenu_view.php";
			?>
			</td>
            <td width="1" rowspan="2" align="center" valign="top" bgcolor="#eeeeee"></td>
            <td width="735" rowspan="2" align="center" valign="top">
		<div align="left">
		<table width="98%" height="31" border="0" cellpadding="00" cellspacing="1">
                 <tr>
                   <td width="2">&nbsp;</td>
                 <td width="240" valign="bottom"><a href="/lvs/">LVS管理</a> &raquo; <a href="/lvs/Servers" class="active">主机管理</a> &raquo; <a href="#" class="active"><?=$formbutton?></a></td>
                 </tr>
                 <tr>
                   <td></td>
                   <td height="1" bgcolor="#EEEEEE"></td>
                 </tr>
               </table>
		<br />
		<div style="position:relative; height:440px; overflow-y:auto">
<table width="98%" height="400" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
	<form action="<?=$formaction?>" id="postform" name="postform" method="post">
        <table width="500"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#D5DEDB">
          <tr bgcolor="#D5DEDB" height="34">
		<td height="25" colspan="2"><strong><?=$formbutton?>服务器节点</strong></td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">VIP：</td>
            <td width="383">
		<select name="VIP">
			<?
				echo $this->bashlib->OUTVIPIP($VIP);
			?>
		</select>
	    </td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">服务IP：</td>
            <td width="383"><input name="serverip" type="text" id="serverip" value="<?php echo empty($this->validation->serverip)?$serverip:$this->validation->serverip;?>"><?php echo empty($this->validation->serverip_error)?'':$this->validation->serverip_error; ?></td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">通讯IP：</td>
            <td width="383"><input name="serverlip" type="text" id="serverlip" value="<?php echo empty($this->validation->serverlip)?$serverlip:$this->validation->serverlip;?>"><?php echo empty($this->validation->serverlip_error)?'':$this->validation->serverlip_error; ?></td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">主机名称：</td>
            <td width="383"><input name="servername" type="text" id="servername" value="<?php echo empty($this->validation->servername)?$servername:$this->validation->servername;?>"><?php echo empty($this->validation->servername_error)?'':$this->validation->servername_error; ?></td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">服务端口：</td>
            <td><input name="port" type="text" id="port" value="<?php echo empty($this->validation->port)?$port:$this->validation->port;?>">
            <?php echo empty($this->validation->port_error)?'':$this->validation->port_error; ?></td>
          </tr>	  
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">权重：</td>
            <td><input name="weight" type="text" id="weight" value="<?php echo empty($this->validation->weight)?$weight:$this->validation->weight;?>">
            <?php echo empty($this->validation->weight_error)?'':$this->validation->weight_error; ?></td>
          </tr>
          <tr bgcolor="#F9F9F9" height="34" >
            <td height="20" align="right">监控器：</td>
            <td width="383">
		<select name="Monitors">
			<?
				echo $this->bashlib->OUTMmonitors($Monitors);
			?>
		</select>
	    </td>
          </tr>
          <tr align="center" bgcolor="#F6F6F6" height="34" >
            <td height="20" colspan="2"><input type="button" name="Submit" value="<?=$formbutton?>" class="button-css" onClick="javascript:document.postform.submit();">
	    <input type="button" name="back" value="返回" class="button-css" onClick="javascript:window.history.go(-1);">
	    </td>
          </tr>
        </table>
		<input type="hidden" name="ID" value="<?=$ID?>">
 	  </form><br>
			
        <br>
    </td>
  </tr>
</table>
</td></tr></table>
		</div>
		<table width="20" border="0" cellpadding="00">
          <tr>
            <td height="4"></td>
          </tr>
        </table>		
		</td>
      </tr>
    </table>
<br>
</body>
</html>